Moves out all stub db related stuff