Fixes to failing test. Moving towards a more DI structure