app: refactoring+context