Parameter cleanup and fixed comparing a signed and an unsigned int with each other.