Fixed all of the warnings present on gcc 4.7.2

Compiled with -Wall and -Wextra.
Merge pull request #100 from rdnelson/warning_fix

Fixed all of the warnings present on gcc 4.7.2