Implemented BDI to all types of knowlede bases, fixed a few bugs