[SMB] Initial commit for #125 topic optimization
[SMB] Fixes from feedback on pr #128