Added PDO to some function

Added PDO to almost all the functions, only 4 left