Restructured js