Fix all stylecop issues

Delete the unused TerminalState enum (since it is within our git history)
Unify the way we raise events within the solution. I.e. through a Raise{EventName}(...) method, which always gets a reference first on the this.{Event} and works on it afterward.