DPY and misc fixes