Clean and rename $db to $pdo.