Improved code organization