Rearranging scripts so compresison works