Redid some IoC code, it was stupid before.