Added downloading logic.