Added a state enum and booleans.