Adding functionality to db
Dates now properly comparable
Really hacky test code. May crash everything - also doesn't generate anything yet.