sort out quotes and whitespace