More refactoring; added ability to subclass transitions