Add PDO support, switch to CDN hosted libraries, various bug fixes.