Silence misc. compiler warnings, add type safety
Merge pull request #126 from Hello71/warnings

Silence misc. compiler warnings, add type safety