Cleaning up and adding gateway_identifier method