Added tests for Loan Object and separated client,IO utils