add settings to defaults object.
improved demo and other code formatting.