Revert "Revert "A lot + new db""

This reverts commit 52d7de06db6a4065bf80f8e95822945303cf76bc.