Added comments describing what the functions need to do.