refactor db setup/wipe