Base resource modified to handle multiple contexts and views

Signed-off-by: Sheik Hassan <solergiga@yahoo.com>
Merge pull request #179 from muslimgiga/issue-171

Base resource modified to handle multiple contexts and views