Tidy up SQL in StockClone.php