I've recently installed some 4" recessed fixtures (IC rated if it makes any difference) that had an incompatible plug for the lights I bought. The cans came with a two-pin orange colored plastic connector/harness, and the lights (Cree branded) came with an Edison style screw in connector. In order to make this work, I bought a female edison-style screw-in adapter (with a rubber shroud), cut off the orange connector on the cans, and used wire nuts to splice the female screw-in adapter into the can's wiring (see photo). The photo makes this apparatus look huge but it fits very easily into the cavity above the light. Can I get thoughts on whether this passes muster with the electrical code? Or is it a bad idea for any other reason?