Added Docstrings to most functions. Changed logic in Index view so that if database is empty, direct user to a child template. This avoids writing a giant if-else block on index.html, and places the logic in the view, where it should be.