Added knowledge base code, hopefully this is useful for all of us