[~]Clean up vi scales code, based on Daedulus's version