updated the javascript interface to better handle properties