Added typedefs
Converting to NVI