Changed to strtoul() and fixed includes