Fixed some warnings

I fixed some warnings. This request can be let open until it fixes enough. But it also can be merged directly if  everything is okay.