optimize memory usage

optimize memory usage

change generator

refined config access method

implement HEIRARCHICAL priority

implement consistency

implement consistency