Refactor PDO
Add error handler