Various improvements to running time, especially for downloading