Remove unneeded code with basepath.