Fixed payoff going wrong.
Saved new payoff in node.game.memory.
rewrote some functions for better readability.