PCI cleanup and better BAR handling