MINOR: simplified code, renamed repayments matrix to flow matrix.