Remove pointless paths