IOC refactor for source complete. Moving on to tests.