Get rid of temporary $pathprefix variable and streamline.