Move connection out of MainPage
Fix header to look prettier