Moved the actual code into a bash file