Simplify the open and forward port routine