Changed all PDO execution to try-catch blocks