Cleaning up code
Adding shebangs
Renaming shell script
Tracking stdout and stderr with subprocess and fixing some bugs