Passing HTML generation in a function instead of the player page itself.