Improvements in Main.