turned on Werror, fixed errors
Merge pull request #58 from kovach/fix_warnings

turned on -Werror, fixed errors

Closes #8