Rewrote download priority logic in the controller file