Update "set_activity"; some cleanup;