Various changes to make it work on the cluster. A bunch of weird bs with paths