Move types in their own file.
State types are simply identifiers.
Get rid of explicit push/pop.