some code cleaning in ork.php