Break up main function on line 326 to reduce complexity lower than 75 so that it passes the golint test.
Break up main function on line 326 to reduce complexity lower than 75 so that it passes the golint test.