Added Test Case Class

And repurposed old functions so they return test case instead of a
pointer array.