Added JSDoc compatible documentation for Javascript.
Fixed small security issues with rhino.