Add canonical classes handling