Queen paved the way for transition to Charles in final years