Reuse existing node object
Replace require with autoload
Extract .define_attribute_method in Resource class