Code reorganization and simplification.