Database dingies
Database finals and tests
Merge branch 'master' into pim