States implemented

Accidentally pushed to master (whoops) but that's been reverted.
Look guys we have states *oooh*