Added code for gateway node, needs to be migrated over to Galileo.