Refactored vector.py to make it more readable, as well as to enable it to work in python 2