State Machine and Bootstrap.

* Added state_machine. Not sure if right though.

* Added bootstrap. Something changed.