Added getTitle method, to get the title of a webpage given the state.