Remove worker global state
Some reformating