Fixed bug with logging
Refactor the entire test suite as preparation to refactoring the production code