Clean up WebGL replay code

Some clean-ups for the WebGL replay code.