Refactor DOM container