With some minor refactoring most parts of this could be tested pretty effectively. Discovery is already an interface, and separating loading data from displaying it is generally a good idea.