Revert "Removed stateMachine"

This reverts commit fb07afc1da18c6e71457126416db088fe2521749.
Revert "improved background"

This reverts commit cdb2b2ba4ab59835f9eb6d8d06f8b7c151d30893.