Made the Arduino class work and made it more efficient.