Improve main.run