Remove unneccary paths