Some refactoring in Activity view