Cleaned up the logging