Added Diode library and revised all