Sorry I couldn't test my examples. I'm glad someone more knowledgeable corrects the code.
I think the second one I'm suggesting needs to be
p=Ref{Port}() #looking Yuchiao comment.
I learn myself too, maybe I should look at docs again. Ref confuses me.
