changes to demo + various little fixes