Implement file downloading
Add comments everywhere