Restructure compilation