Recently, I had learned that we should add a function, maybe, called uninit to remove the event listeners. This may help unit tests work.