Refactoring, clean-up, and log levels.