GUI for demo

and other bug  fixes