Upgraded RMS to a weighted aggregator. Fixes #788.