Yes that would be grouping by type in my opinion.. Basically one if statement corresponds to one type. I will use this code block for the init.