fixes several nit pick code annoyances.