Switch from raw SQL to SQLAlchemy ORM, make all HTML Unicode