Merged mlidbom's work on the demo project