moves relative url root functionality into own module