Tidying up XPD stuff