container refactor phase 1