More refactoring. Separate logger into its own class