Move code from FIJITestsViewer and generify it to make it usable for other modules like the EE CLI tool.