Added controller side of setting ports.