New Changes to the base classed and docs

Updated the code logic how to use protocols and base classes and the
related documentation