Remove unnecessary spaces at end of line