Finalized touch code for portals.