minor fixes and formatting