Resource context refactoring
Merge pull request #122 from norzechowicz/resource

Resource context refactoring