Added comments describing functions.