Cleanup/improvements for DI.