Fixing some warnings

It was difficult to sift through all the warnings, this reduces them a
bit