Removed dependency on outside events and optimized Share widget and menu bar