Refactor url normalization in StoryRepository