Refactor default box url code to a method.