Clean up some code and force Calling the GC
Fix issue with generated download links