factored StringModelPrim and FFTPrimitive into .h files