finished moving registerElement to JXG