Refactored Context class into Base and Derived classes for cleaner futur...

...e development.