Changed most options to use the global state scope object.