Improved main