Modified to support mapping all ports and added discovery service support