remove unused var
basic attributes support
implement iterator for attributes
use attributes iterator in serializer instead of range
suppress dead code warning for node_type()