clean up and fix various style bugs