splitting node state and shate handler into seperate modules