Updated for BC 6.0.x compatibility
Also cleaned up some other warnings.