ENH: use new class to decrease the number of vector used