make rule have type and name

Going with a very verbose version of a tree for now, definitely can be optimized. But this way it is at least simple in how it is constructed.