Added final states, some aux functions, methods for every state