In autumn Hermione went back to Hogwarts to complete her seventh year – Professor McGonagall allowed her entry as a mature student with her own small quarters that magically appeared in Gryffindor tower, even though she was only a year older than the eldest seventh years. The company of other teenagers, especially Ginny, was a welcome distraction, though she sorely missed the times she had had there with Harry and Ron.

Consolation was to be found in the presence of Neville, however, who had also returned to the school to complete an advanced Herbology course under the apprenticeship of Professor Sprout. With more freedom than the younger students, she and Neville spent several evenings at first, propping up the bar of the Three Broomsticks. After a few visits, Hermione made her excuses to remain at school to study so that Neville could make clumsy conversation with their old classmate Hannah, who was working behind the bar. Madam Rosmerta had taken the young Hufflepuff under her wing after hearing of her mother's murder by Death Eaters, and was training her up in the running of the pub.

Some changes had taken place in the running of the school. In the work of the previous summer, putting the school back to rights after the Battle, Professor McGonagall had found Hermione's old S.P.E.W. manifesto in the ruins of the Gryffindor common room.

After reading it, the headmistress took herself down to the kitchens to address the school's non-human resources policies. Once all the school's elves were assembled around her, the Professor transfigured a heap of withered vegetables into assorted socks, hats and vests, and distributed them to the elves. Her reassurances drowned out, the elves instantly fell into a shrill clamour of wailing, assuming they would have to leave their comfortable servitude at the school, their home for so many years.

Professor McGonagall eventually caught the eye of one very elderly, wizened elf, who seemed familiar, though she couldn't quite place him. He appeared more resigned to his fate than the others, and he was able to call for silence from the lamenting elves in his deep, croaking voice. Once quiet had been established, the Professor conjured up a pile of parchment and distributed a sheet to each elf. 'These are your new employment contracts,' she explained. 'I would like you to organise together and appoint a, er, spokes-elf who can return to me tomorrow with your salary demands.'

First thing the next morning, Professor McGonagall was visited by the older elf who had helped her quell the wailing the night before. His name was Kreacher, and she soon realised where she had seen him – in Order meetings at Grimmauld Place a few years before. His role leading the elves during the Battle of Hogwarts had made him an easy choice for the newly formed Elves Union.

Kreacher presented the salary demands the elves had agreed upon, and McGonagall stifled a smile at the modesty of what they thought they deserved – a mere two knuts per month. She quietly tripled the amount and made it weekly, then signed the contracts with a flourish. If one good thing could come out of all the tragedy, she thought, it would be that the future of the school's house elves was improved.

Kreacher, however, held back. He wished to ask leave to return to Grimmauld Place and serve his young master there. Professor McGonagall gave him permission, on the understanding that the elderly elf would always be welcome to return to Hogwarts if Harry did not feel he needed his services.

Once Hermione started back at Hogwarts, she fervently congratulated her former transfiguration teacher on these progressive changes. In the conversation, the sad story of Winky emerged, and the Professor immediately sought out the young elf in the kitchens.

It appeared that Winky still had not adapted to life at Hogwarts, and pined for the more personal servitude that came with being the house elf of a wizarding family, although, with Kreacher's help, she no longer sought solace in a bottle.

Professor McGonagall immediately offered Winky the position of personal assistant to the headmistress: to take dictation, dust her study and keep up her biscuit supplies, among other light duties. At first the elf reeled with shock at the kindness of the offer, but quickly recovered, and accepted the job with great joy. She committed herself fully to her job – and her employer – with great devotion, and found far more happiness serving the Professor than she ever had with the Crouches.

As a mature student, Hermione was permitted to take leave each weekend, and alternated between the Burrow and Grimmauld Place.

Harry had finally been able to undo some of the spells on the gloomy house in Islington, now that it was no longer owned by a member of the Black family. The dust- and doxy-ridden curtains, the tapestry with faces blasted out of it, the screaming portrait of Sirius's mother and the row of decapitated house-elf heads had all been banished, with more cheerful furnishings in their place.

Harry and Ginny had re-established their relationship, so Hermione was careful not to crowd them by staying too often when Ginny was there. Ron had no such qualms and used their house as a base for his forays into Diagon Alley, enjoying the reputation he had gained and the drinks he was offered on the house at the Leaky Cauldron, as well as the endless excellent meals that Kreacher provided. The old elf was happy in his return to Grimmauld Place and even managed to keep comments about blood purity to a minimum around Hermione.

Fred and George opened the shop all week round, but often went out with Ron in the weekend evenings, until they noticed how rarely Hermione accompanied them. She had not told them that she went to visit her parents at St Mungo's every weekend, until one night they apparated beside her at the disguised department store entrance to the hospital.

'So, this is the mysterious thing you do get up to of a Saturday evening, Hermione,' George said. 'We knew you were off out somewhere, but we thought you might be going to former Muggle haunts.'

'Please don't tell us you're wasting your youth visiting old Lockhart, sweetheart,' Fred admonished her, with a gleam in his eye. 'He's not really worth it.'

Hermione decided to take a chance. The twins had been capable of some of the kindest acts she had ever seen, and she had loved their company over the previous summer. 'Please, I'll show you, but so far only Harry, Ginny and your parents know – it's not really very conventional what I've done.'

The twins looked baffled, but followed her without further questions. She was heartened by their faith in her and the concern that had led them to follow her. She took them up to the ward where her parents now lived. As soon as the twins caught sight of the Muggle inmates, George exclaimed, 'Isn't that your mum… and your dad?' Fred looked similarly aghast.

Touched that they would recognise her parents after only the briefest encounter in Diagon Alley years before, she quickly explained how she had found them, misdiagnosed in a Muggle hospital, how they had been tortured out of their wits like Neville's parents, now their fellow residents.

From then on George and Fred gave up every Saturday evening to visit St Mungo's with her. They would laugh gently at her father's silent, but child-like pleasure at the parchment phoenixes and hippogriffs they sent flying around the ward – harmless variants on the charms they used to create the fireworks sold in the shop – or sit quietly chatting to her mother, letting her hold their hands. Neville was often there too, occasionally accompanied by Hannah, still patiently taking the sweet wrappers his mother would offer him, but he and Hermione tended not to say much about their visits once back at school.