Current code is hard to debug, improve the logical layout and add sufficient comments around the core Loan schedule / interest recalculation classes