Refactored class and test structures