Upgrades to the PHP script