ThreadsafeDepository refactored