Remove trailing whitespace and fix file endings.