Improved code structure.