removed name as parameter from Mode, only use for read and write. Also, changed &v to v in argument of ToVec