Tidied code in vsm0.