Cleaned_up version, without parallel capability, skyfraction, and the functionalities of calculating the redshift distribution, the standard deviation of the deviations and making a Hubble diagram, but with a functionality of calculating distances using the perturbed metric (with the potential calculated with Sofies code)