Cleaning up Arduino code