Added a document describing the types of messages that can be passed. Also added a the caculating functionality to the non-broken agent.