Use a test db for tests

Closes #1
Check that weights are coherent before validation

Closes #7
Refactored Log specs