Added new test classes and minor fixes for test code