Isolating url generation from code