Fixing monolithic bug related to strtok()