refractor and update web ui framework