Reorganizing classes for better modularization