Making use of unit tests. Fixed some whitespace in lender.py.