Move history fn to url module