refactored the out the global knowledge builder, since the agent has it never the less. better to have one global less..
rearranged and documented methods.