clean up eol chars and trailing spaces