Assorted porting frenzy:

mostly replacing posx,posy with pos().