Working on the statemachine for the garden-core. Needs to be put back into the real package