Added FunctionalTestCase class
Refactoring