Restructure and format bom