Functionality split to make test more independent

Code reorganized so that each test runs on its own set of data