compiler. Reorganized AST types, debug log errors, fixed #331, fixed #296.