Defined getChildStates and fixed various things