Html is now inserted to document only when needed