Implemented more functions in vector.cpp