remove functions that belong in a different module
get miscellaneous AST checks up and running.  use a couple of extra parameters instead of a monad stack