Moved StateNode to different file.