API: added functions for debugging and renamed userListeners.