Bugfixes, improvements, reading settings from file.