Adding a stronger modular structure while implementing tests to check va...

...rious class functions