Clean up Arduino code