added RootState, refactored state tree implementation