Refactor tree naming into the rules themselves