Refactor requests and replies. Add logic to parse GContext requests.