'tr' command wasn't doing any replacement
Added comments to functions
Primary cause of false Travis CI failures was running 'apt-get update'. Refactored all instances where this was needed with manually fetching and installing dependencies in S3 instace. This also includes GCC installation.
Added external bash file to source functions from