Restructured javascript
Restructured javascript