Fix up message editing setup form to use sqlalchemy.