Update vt.py

bug fixes and better work as module