Updated comments and clarified code.