Cleaned version of test framework