Merge pull request #5865 from rohitwaghchaure/v7_fixes_and_cleanup

[mionr] fixes and cleanups