Minor refactor and new test. Added a Cashflow class.