fixed #8, #28 added methods for saving and loading settings from localStorage.