Fee Calculation work

fixed some merge conflicts.