Rename data to state in comments where appropriate (data is called state when we send it back to the client)