Fix clang warnings.

This pull request fixes some simple warnings which clang emits:
- mismatch between class and struct declaration
- mismatch between unsigned type and signed value
- missing virtual destructor