delete some useless code and modify the ui