added javascript wrapper objects

@perlun: all ive done so far for #159 maybe you can make use of it