Added class Rule and Tg