Making the state immutable