markets.php cleanup