remove-warnings - some small refactoring to reduce the number of warnings under clang