Base resource modified to handle multiple contexts and views

Signed-off-by: Sheik Hassan <solergiga@yahoo.com>