StateMachine: clean up and DocumentClass for starling added