Import existing code from http://code.google.com/p/antdav