Updated stateProvider to handle multiple views