Improve main and associated methods