Split work in main to functions