(RSP HL) backport bsmiles32 - Refactr some mixing routines