add hierarchical refinement
further implement logics of Hierarchial refinement, and fix serveral bugs of graphical display