Divided into files, changed the way to execute the script