Remove unused member vars.
Remove useless test (index is unsigned).
Remove useless assignments.