formatting fixes and cleanup