Fix API, add generation tests, clean tests correctly

Add get  [] and len() compatible API, add names checks from
properties and Nodes.
Add basic generation tests, integrate to test suite.