Add optimisation to search_state response so it only returns data if there has been a change. Also remove a couple of unnecessary headers from the response.