Fix linter and compiler warnings