ENH:add a structure for quota lib and add some docs