updated demo file and fixed some tiny issues