Improve main