Updated thing.php to use latest code