Moved dload functions to separate file