Refactor activites.