Restructuring to make clearer