clean up some coding style

mostly breaking long lines into multiple lines and changing indenting on if then statements
add -Wall