Clean up formatting, maintain consistent style, remove trailing whitespace