Improved code.