more rewrite of tools, this time add separate classes for each type, and remove some complications like GetElementID