Example of rendering nodes and adding event listeners