Added extra cleaning step to remove errant ^M characters