Added a demo for the new UI stuff and some bug fixes on ui