Split out the struct building interface

Split out the struct-building interface.