Added the PDO Adapter and fixes a lot of other stuff