Move node state to own file.