Fixed build.xml file.
Added docFields (titleField, authorField, etc.) to docs/hits results.

Also includes some refactorings in progress and some auth stuff.