Remove spaces at the end of lines