Split out db and queue into their own packages.