Get rid of all global state mutation