Remove compile warnings

Remove unchecked  warnings by fixing generics or suppressing the warnings when no other fix is easy achievable.