1. Improved on strtok to be more concise
2. Added some comments