Improving how we escape single quotes refs #129 #5 #112 #95 #39