move argparser into main, clean up global variables, change global lists to tuples