Added logging, refactoring
Merge branch 'master' of github.com:Adyax/docman