restructure meta-data generation so that it's possible to generate meta-data for multiple multi-level structs
int => size_t for less casting