Extract HTML rendering to different module