Factored out db code into a common library and a model for the collection
Editing a todo now preserves the creation date