Fixing warnings

Remove some warnings as suggested by clang.