Move tab events to their respective tabs
Fix calling onLeaveTab when there's no current tab open
Rename 'Optimization' to 'Optimisation'