add event and add document from menu

bugs fixes and gui updates