Added Settings.php , reduced sqldata code