Updated to use arc. Fixed crash with not valid tones.