Yes you're right, the interest is charged on the decreased amount.
It isn't linear though. For example in the first year, each repayment comprises about 99% interest and 1% principle. In the 30th year that ratio swaps back the other way, and its a gradual curve in between. So its NOT 90k...