refactoring: avoid activity references