Tidied up Pdm more #31