Few optimizations

Implementation: State Set getState() removed, not clean, but may help
Implementation: Unfolded boost cycle