update view,remove useless code