cleanup SV code