Added state stuff

Forgot to commit this donkeys ago