Added tests, updated functionality to remove all event listeners