Patch from Randolfe Averty to fixup package conflict checks, cleanup some memory...