Updated demos, fixed some bugs