DB implemented. Closes #2.