Changed over the resource management using DI rather than hand rolled.