Add Factory class and Slot struct