fixed javascript in example application
fixed documentation