Fix Listener class's __getitem__ method to return the correct data. Add a test for same.