Remove unused imports and a little bit more of the panic detritus.