process gui, fix some big bugs, add click edit support