Improved handling of tools and events