relative url and some cleanup