Removed dead code.
If an expanded type ends with "State", remove "State" from the name.
Removed out commented code.
Lists are now initialized again in the constructor.
Removed empty line.
Improved the indentation in stateImpl by introducing the class State.groovy (work-around).
Changed implementation of isValid so that expanded isValid-methods is called. Moved getState-methods to the end of the class before equals/hashCode.
Fixed a bug in the hashCode method.
Improved indentation when isValid consists of more than one row.