clean up demo.html
updated build
improve profiling code
fix a build error
Update master
remove getopt.cpp, not needed since emscripten provides it in libc
merging new changes