Removing visitor interfaces to make tree operations more obvious