gateway: rename some variables to make it more readable