Fixed nasty jumping LED bug

Also cleaned up Arduino code