Added a logger, and some more tests