Added in a simple switcher for states.