Refactored (not altered) Tax Calculation

This adresses and solves various bugs:
- Sequence is not respected by tin/tax
- Calculation of tin was squared when tax should be included in abse amount of new tax
- tin calculation was inverted deferring sequence order