Made various changes so it runs with python2 rather than python3 which is the default for Arch.