Finished logger, minor refactoring