Updated gateway to be a subclass of object