Rework code organization