Edit my scripts and rearranged variables in main