Improved code following recommendations