Add PortMap and tests