Fix most warnings when compiling in pedantic mode.
Merge pull request #18 from bsmiles32/pedantic

Fix most warnings when compiling in pedantic mode.