Simplify the port code a bit. Make task point to its owner core.