Add statemachine documentation