Environment can now calculate global, local, and difference rewards. Lightly tested.