remove newlines and returns, then trim whitespace