updated from master branch + fix

fixed some bugs - moved PDO creation inside config.class