webui: a little code rewrite
webui: rewrite special terminal command code