refactoring path/url dirs

fixing bug causing loop effect in paths its more polished this way too