correct formatting and some code cleanup