This patch cleans up the strsep implementation and improves performance.