Indented html and applied OOPS in JS