Moved class definition outside of test code