Converted atoi to strtoul and removed unnecessary casting.
Merge