The approval helps set the company up for life after Chapter 11.