Restructures scripts

The build database scripts are kind of a disaster, and hopefully I won't be
needing them ever again. But I might.