Just an idea about the Mirror of Erised being able to grant 1 person (with the purest desire) in times of hardship or war their greatest desire. I thought it could be Hermione (after Dumbledore dies) who has the purest desire to bring back Lily James, Sirius, and Dumbledore. In doing so giving her life up to the mirror. Dumbledore not wanting to be back gives all his memories to lily and switches places with Hermione in the mirror. Harry confesses his love for her. Reunites woth his family. They use the pensive and prove snapes innocence and find out about all the horcruxs. defeat the bastard and live their lives happily.
