Added new demo, fixed some bugs