Added comments to a few functions.