gui example refactor discovery examples