Cleared a few more warnings (mostly sign-unsigned comparisons and unused variables)