Rip out the test functions and move them to the test file