Tweaks to the db setup code