Several improves in Main Container refactoring.
Merge pull request #1389 from diegosarmentero/master

Several improves in Main Container refactoring.