- restructure generic download function, with tests
- add support for XLS files, with tests