Small refactoring in gui.rtdemo.