Moved several parts of MDP to multiagent