Added better parsing for the settings file.