Updates and fixes to various scripts