Improved code layout