Remove trailing whitespace
More functional solution