Move middleware into core.