Makes sure generated attributes are typesafe.
Fixes handling of dynamic nodes.
Updates README with examples.