added a trace library for inline debugging, and fixed most of the bugs in the parser.