finalized first version of node type api and added a simple test. issue #1