Revert "Torch + Small Database fix"

This reverts commit 7118b7df33b916de337e739120b5067192425059.