Completely finished code of avatar creation and download