Move code into an application script