added menu and ui methods to directly add to the objects instead of to object.elements.