Added more comments to the functions.