bunch of refactoring

o moving to shared_ptr in the AST
o exceptions in the tree
o function pointer lookup in the json stuff
working parse with workable errors