Initial implementation of defining a state hierarchy