Moved MainView to new thread so we can add listeners to it