Initial working version.

Slightly refactored from jsdroid but using custom built js.jar