yad.php - Code cleanup and fixed small syntax error in getCriteria()