Added some comments and touched up some code to reflect the new change.