Updated test framework, fixed minor issues.