Using new site attributes and small refactor