Added a few UI unit tests. Part of #781
Also some minor code clean up: deleting commented, thus unused code, etc.
Committing current state of new download logic implementation. Part of #918