Added header files, changed how vector type is determined