Fix knowledge base, tokenizer/parser, add deparser