Cleanup some parts, generate BOM.