Changed route provider to state provider