Refactored class `Activity`.