Put metadata functions & types in new module