Switched the deprecated element event listeners to use the new stream-based listen instead.