Removing PDO queries