clean up a little - read DB config from flask config and basedir from config
clean up DB initialization
define templates and a default view for app.html