Remove trailing whitespace, some cleanup