finished refactoring separate contexts and implemented sub app config #7 #22 #24 #25