Please document what these functions are doing.