Clean up some unused fields
Add tests for loading KB