make sure no leaf element turn to relation
refactor the uri builders