Remove warnings

Remove some warnings I see.

The third commit should be reviewed, I'm not 100% sure about it.