added the knowledge base stuff

and a few comments