Change js structure