Fixed typo in javascript
Removed debug messages