bugfix in conversion code when passing back objects that are already references to JS objects. Implemented addPageElement. Added tests addPageElement.html and getPageElement.html