Clean code for the download the entities