Improved the script even more!