formatting unification
rename makequote to makeescape
switch detection state machine unification