metadata bundle and refactor core bundle