Clean up download queue code