Some activity related refactorings