Deep inelastic scattering and forward $\pi^0$ production at NLO