Improved the quality of the code