Clarify some of the comments for better understanding. The code needs to be refactored for a consistent coding style.