WIP DB_CUSTOM_V3

Compiles, untested