Multiple fixes

* Proper document deletion & synchronization
* Delete database when deleting configuration
* Harmonize paths