Add vec_basic type and related functions

Also make all the names more intuitive.