Refactored logger class.