Cleanup pvdrm code