Fix typos in comment.
Global refactoring. Enable database writes. Close #2.