clean up the logging and basic formatting