Comments added to explain the functionality of the class.