Feature/merge into db

This seems to be how we're doing things now. This is for the merge script and some miscellaneous changes.