A few tweaks to matlab scripts