Added -Werror to compiler flags, fixed other warnings/errors triggered.