Took current layer out of the context and put it into the state