Start of cleanup: Generalizing functions, parent object Agent, Policy object added