remove windows carriage returns and clean up some whitespace