Whitespace, trailing spaces and general fixes