more tests, add documentation, __len__ magic for DOM API