Reorganizing script