Refactored code into more manageable classes for future expansion