Clean up some spaces and logging