cleanup and fix the unit tests (#5)