Added HtmlPage class and fixed some issue