delete some useless codes, use dispath_once to create sigleton

delete some useless codes, use dispath_once to create sigleton