move class calculation code into node
Add class bindings