Refactor for Arduino IDE