Added DatabaseFactory.class.php and reworked config (added Config.class.php)