Javascript error handling (fixed all errors in js,html)
v0.9