Improved api, support for java and javascript one