step 6: Big Refactor, rejoin test function, split code to 2 classes