replace strcasecmp() with strcmp()
remove more dead code