first iteration of main container refactoring