Move opener setup into a separate helper function