[CHORE] Fix gateway client variable and tidy up.