Restructure container for duplicate key code