IoC is now working thank to Maxence. Also did a bit of refactoring.