1.3 switch update

bug fixes, parser re-write