add removeMissing and improve other rpc functions
some crappy code to make fix missing work in gui