Minor changes Some vector manipulations