Huge api refactoring and update nodejs and vala bindings