Improved code comments

Added better comments in code to make it more readable.