In the update weight function in the random selector files, the main version currently incorrectly sifts up when the new weight is smaller, and sifts down when it is bigger. This seems to be incorrectly maintaining the heap, and would need to be changed to improve heap performance.