Redid the code in a more pythonic fashion and finished the unit tests.