Fix fee calculation and default rounding

My code for quantize and fee calculation was wrong. These commits should fix this.