improved PeripheralProvider with better logic and cache

PeripheralProvider now has a WeakHashMap cache, as well as better validation being performed when attemping to wrap peripherals, throwing exceptions when the developer has implemented something wrong
unused import and class cleanup