Split the cstruct stuff into a different module