Add tests and get config to work
Add tests for model and persistence, fix bugs along the way