Added getting settings from settings.txt
Some fixes