Change the add function for Listeners to not add the same listener function more than once.  Change the remove function for Listeners to not delete the last listener in the list if the requested listener isn't present in the list.  Add a "has" function to test whether or not a listener function already exists in the list of listeners.