implement brute-force prime factorization for type_contig_x
add impl of type_vector unwinding
reorganize preprocessor logic