Ioc and Domain classes refactored.