Separated container element from empty element logic.