Class structure for js