Renamed/standardized functions.  Added comments.