Stop using atoi and switch to sscanf.  Closes #1.