Refactored setup third container code (DRY).