refactoring save/updates. Added join/leave team and update history for activities.