Moved parser-gateway sanity check to tests; uncommented check test; other small style/factor changes per discussion on pull req