fix imports, gui build script; remove dead code