correct formatting in all files

remove trailing spaces, set indent to 2 spaces, remove blank lines at
end