Restructuring scripts