Address gcc -Wtype-limits errors.

- Fixes warnings in #19 and #16.