added nodeFactory to Node class
removed factory  asbtraction. Now use Array.newInstance