Isolated code in lab4test.cpp and lab4performance.cpp into submethods.