Move demo to demo folder
Move some code to demo js