Removed an unused variable and an unsigned/signed comparison warning.