Updated test framework and added tests