Fix lots of warnings.

Submitted by: Richard Levitte <levitte@stacken.kth.se>
17 files changed