refactor(activity): minor refactoring and tests.