Refactored/updated db/broken backward compatibility