Changed to use strcasecmp for case insensitive compares, improves profiling a lot