Added update for activity.
Delete some deprecated codes.