Added some comments to some of the newer functions.