macro refactorings
fix equality by references of states in several functions
unused states warning, locations of warnings
transition overriden warning