Database test

Includes new test for database and some corrections to families I've been making using this new function.