Added comments describing each function.  Left in older versions for posterity.