remove the globals and isolate parser and compiler

A bunch of cleanup. The jshint fixes revealed there are a bunch of globals
 
* put parser before compiler
* isolate parser compiler
* remove getGlobal
etc.