cache childnodes
clean code
cache node type
clean code
add tests for isses #4, not working yet