Factor out application and FitsView class