Refactoring some classes to demo testing