Refactoring the script with functions
That should help Ubuntu to not spit out the script...