Added method to remove unused listeners from the main frame.