Separate html processing and rendering