Updateing loan-calculator remove duplicate code from amortize-js