Restructuring some stuff