refactoring
Refactoring application to work as separate contexts