cleanup formatting and comments