Improved code

Improving the clarity of the code