Changed html generation mechanism