jsDAV upgrade and refactor