Creating js structure