Improved settings.
Added unit tests for settings module.