Remove unnecessary codes and ui