Changin JS structure