Added first version of javascript api