Converted listener to use storage events instead of polling.