Code reorganization (IN PROGRESS)