Remove blank lines and trailing spaces.