Moving main away to ease readiblity