Refactoring and added mockup classes for complete use cases.