Improved Swift scripts