Restructure and compile