Adding documentation for databases and cleaning things up