Convert to app factory pattern; add blueprints; add flask-admin