Reestructure code organization