Several improves in Main Container refactoring.