Expanded and commented the StateNode inner class