Reorganizing class structure