You can get rid of `$name` and `$type` here and stuff them directly in the array