Added equals and hash to state and updated cfg