Changed strncmp to memcmp for *hopefully* faster checking.