Improved the commenting of the code.