Added more strict compiling options and fixed most of the resulting warnings.