Turn on -Wall and fix some of the warnings