Some markup fixes.

You have a lot of duplication. You should look at using a base template into which you can add the main content.

http://flask.pocoo.org/docs/patterns/templateinheritance/