API rebuilt. PDO and full religion support