Revert the stateEngine.ps1