Saving selection in local storage and fixing on/off event propagation. (fixes #3 and #4)