Move some structure definitions out of vectors, use pointer-type