Refactor StateModifier, add missing origin attr, add to docs