ms-list not bounded correctly
Fix a few bugs in Ruby code. Cleaner as it does sorting and stuff.