Remove commented code and cleanup logging.