Fix some of gcc's complaints

Now building with -Wall by default.