Trim trailing whitespace