Migrated another bit of middleware