In the middle of a housing estate in Bellshill, North Lanarkshire, sits St Saviour's High, which closed its doors to pupils in the 1980s.
The building oozes neglect; it is drab and dingy and paint peels from the walls. However, push the right door, head down the right corridor and suddenly everything is pristine, polished and colourful, as if parts of the building are fighting the urge to fall into disrepair and keeping up the pretence that this is still a functioning school.
In the art room, pots are fat with coloured pencils, sharpened ready for use. There are tubs of brushes and trays of paints. The walls are adorned with pupils' artwork: framed self-portraits and still lives featuring a ram's skull. All is bright and cheery; nothing has yellowed or curled at the edges from having lingered on the walls too long.
The science lab is poised to receive its next class. There is a picture of a Bunsen burner on the blackboard, neat and precise, illustrating how pupils should carry out an experiment.
It is all perfect. Too perfect, in fact, and that perhaps is the giveaway. St Saviour's once was a real school, but this is not real.
It has been transformed into St Jerome's Elementary and Middle School by the BBC, which is in the midst of filming a new children's drama, Half Moon Investigations. The series is based on Eoin Colfer's novel of the same name, about a boy, Fletcher Moon, who gains an online detective qualification, allowing him to investigate crime.
If Fletcher were investigating this mystery - the strange case of all the activity at St Saviour's - he would find his first clue in the car park, where a space is reserved for Principal Quinn, head of St Jerome's.
Fletcher is played by Rory Elrick, a pupil at Jordanhill School in Glasgow and a member of Scottish Youth Theatre. He got the part after auditioning in the summer holidays. The other main characters are Red Sharkey, Fletcher's best friend (played by Seb Charles), Mia Stone, a journalist on the school paper (played by Olivia Grant), and April Devereux, leader of The Pinks (played by Nicola Duffell), who was described by the author as "a Barbie doll who has walked through a magnification tunnel".
There can be a certain snobbery among those working in adult drama when it comes to children's drama, says Josephine Ward, the executive producer. They think it is a soft option.
"Many people who work in adult drama dismiss children's drama as an easy genre," she says. "I was the same until I came and worked in children's. Now I do find that it's as hard as adults' and there are other difficulties as well."
Half Moon Investigations is intended to appeal to an eclectic group of children aged six to 12.
"It would be impossible to teach a class of kids aged six to 12 and pitch it at the right level for all of them," Ms Ward continues. "We try and include ingredients that will appeal to different parts of the audience, so there's a bit of slapstick comedy that the littler ones like and more emotional depth for the older ones. Generally we just try and spin a good yarn that everybody will enjoy."
Another complication is the restrictions placed on the length of time children in Scotland can work. Not only is the number of hours they can film on any given day limited, the number of days in a year they can work is limited too - up to 39 days for under 13-year-olds and up to 79 days for over-13s. So one of the first questions during casting was: how many days have you worked already?
Three of the four main parts went to children who had never appeared on television. Olivia, the daughter of Fame Academy vocal coaches David and Carrie Grant, is the only one with television experience.
The children, who are all under 16, have to be chaperoned at all times and receive about 15 hours of tuition a week in order to keep up with their school work.
"The schedule has to be built so there are enough breaks and time for tutoring," explains Ms Ward. "The minimum amount of time is 30 minutes for the tutoring to be meaningful."
Accents present a further challenge. Although the drama is being filmed in Scotland, the cast come from all over the UK, creating an issue with accents, especially when it comes to building families, so voice coaches have been brought in. The actor who plays Red Sharkey, for instance, comes from Southampton but the other family members come from Glasgow.
It was Seb's mother who suggested he audition for the part of Red. He is still not sure why, since he did not quite meet any of the criteria. "I'm not a redhead, I'm not Irish and I don't have freckles," he says, "but I got the job, so I can't complain."
He has red hair now - dyed. But he has been spared the task of cultivating an Irish twang, although the actors playing his parents have not been so lucky.
Jonathan Phillips, the producer, says: "There are the Irish roots of course, because originally the book was set there. Then we are shooting in Scotland and the cast are from various parts of the UK.
"Ultimately we're imagining we are in a place called Moonsland or Moonsville, somewhere all these different people can come together."
"A polyglot community," Ms Ward chips in.
Several old Scottish school buildings were visited in the BBC's quest to find a set. St Saviour's won largely because its windows were still intact: the others had been so badly damaged, the glaziers' bill would have used up the entire production budget.
"Children's BBC is committed to spending a certain amount in Scotland," explains Ms Ward, who is usually based in London. "We are a moveable feast, a self-contained unit, so it's easier to move us than something like Blue Peter."
The production offices - costume, make-up, the green room - and the tutor room are also based in the school.
Space is at a premium. Sets are built, used for all the scenes that require them, and then dismantled.
Before the science lab was kitted out, it was a corner of the library. And the old St Saviour's gym has variously been the set of Fletcher's bedroom, Red's bedroom, a spooky science block and a stage with a trap door which Red was required to pop out of, while hunting for a missing statuette.
Finding ways to make full use of the boys' bedroom sets has been difficult, says Mr Phillips. "We wanted to use them as much as possible, but finding ways to get the characters home in the middle of the school day is tricky," he admits.
"They have more elongated lunch breaks than you can imagine," adds Ms Ward laughing.
Shooting multi-episodically, with scenes from different episodes shot on the same day, is challenging for the four lead actors, says Mr Phillips.
"They have to work out where they are in their emotional journey, what has come before and how they should pitch their performance," he says.
"For inexperienced actors that's a tough ask, which is why you need a director on top of their game, supporting them."
Half Moon Investigations starts on Monday January 5 on BBC1 at 4.35pm
GETTING IN ON THE ACT
Filming is a tedious process. One line fluffed, one unrestrained phone ringing, one cough or splutter from the crew hovering in the background, and the scene starts again. Even when they get the perfect take, it can be repeated umpteen times to shoot the action from different angles.
It is a wonder that the young actors, including Seb Charles (left) and Rory Elrick (playing Fletcher "Half" Moon), do not tire of the repetition but they say emphatically they do not. Clearly the novelty of being in Half Moon Investigations, a new TV drama, has not worn off.
Their chaperones hover, holding bags, taking pictures for parents.
There are about 80 people on set every day. The make-up artists are constantly on call, ready to check the characters every few minutes.
They clutch photographs of the young actors, showing them from the front, back and in profile. These tell them what costume was worn the last time they did a scene in this episode, how long their hair was and what their make-up was like. It is all about continuity. A scene could end with a character walking out the door and not be picked up again for weeks.
In a scene in episode 12, Mia, a journalist on the school paper, has just struck some kind of deal with April when Fletcher comes in, looking for information about "Glam Bugs". They are this season's must-have in footwear, Mia tells him, decorated with butterflies, dragonflies and beetles. Before she rushes off to a meeting, Fletcher asks if she has seen his investigator's badge. She hasn't.
Why is Fletcher so interested in the latest fashion? Why is Mia colluding with April? And what has happened to Fletcher's badge? It will be January before we begin to find out.
Thirteen-year-old Rory Elrick, an S3 pupil at Jordanhill School in Glasgow, had never been on stage before or acted on television. But during the summer holidays, as a member of Scottish Youth Theatre, he attended a mass audition for the new Children's BBC drama Half Moon Investigations and won the lead role.
"I wasn't expecting it at all," he says. "It was just really exciting."
His character, Fletcher Moon, is "a great person," says Rory. "He is kind and always thinks he's doing the right thing, although he might upset other people."
Jonathan Phillips, the producer, suspects the two have a lot in common. He uses words such as "incredible" and "remarkable" to describe the way Rory has turned acting from a hobby into a job.
"Rory is interested in the process and the detail," says Mr Phillips. "There's an interesting blending between who Rory is and who Moon is. Moon is a bit of a geek and a clutz as well. To some degree, I think Rory relates to that and he is able to project these things convincingly. How much of that is him, only he can tell you, but certainly there's a degree of cross-over between the two."
Rory began filming in the summer holidays and is on set most weeks from Monday to Friday. The highlight, he says, has been meeting the other cast members and the friendships they have formed. "There are bound to be some disagreements but they all get sorted out," he says.
In particular he has formed a firm friendship with Seb Charles who plays Fletcher's close friend Red Sharkey. "If their bond was not credible, we were in trouble, so we wanted to make sure the dynamic felt convincing before confirming anything," says Mr Phillips. "We got them reading together and it clicked."
The filming itself has also been enjoyable. Rory says: "It's brilliant fun doing the big scenes where you're maybe running down a corridor or something, the ones where you are doing more or using lots of props. There's lots of different action."
Being chaperoned all day, every day has been a bit strange. "You are with someone you don't really know but they are talking to you as if you are their child almost."
However, Rory appreciates why the chaperones are necessary. "They look after us and stop us hurting ourselves; not that we would, but they're there just in case."
With filming coming to an end, Rory is looking forward to seeing his friends again. He has even acquired a new appreciation of school, though tutoring had its advantages, such as "a complete absence of homework".
"It's been a totally different experience being tutored," he says. "I think we've all fallen behind. We've been tutored around three hours a day, and at school we study for six hours. I don't feel drastically behind though; I think I'll be able to catch up."
Rory is not sure that acting is the career for him. "I'm just taking the opportunities as they come."
Simon Charles leans against the front of the former St Saviour's High, having a cup of coffee. Regular breaks are probably a good idea, given the slightly surreal situation.
Mr Charles is an English teacher and is working in a school, but the school is no longer open and filming is going on instead.
His position is made even more baffling by the range of subjects he is required to teach - including maths, history, physics, French and German - and having to get to grips with the English curriculum as well as the Scottish.
The only subjects Mr Charles is not expected to deliver are some of the practical ones - PE and music, for instance - because the facilities are not available.
"I've just been reading up about the Highland Clearances," he says happily. The physics that he has to plough through has been less satisfying, but he is determined to try and give the children in his charge more than just book-based learning, wherever possible, he says.
Mr Charles enjoys teaching on set, because he gets to work closely with individual pupils - usually in a class of five to 10 - moving at their pace. It can be difficult, however. He has to adapt to the changing location of his classroom. This morning he was in the art room; this afternoon he was in Principal Quinn's office. And the very moment a child becomes engaged in his learning, he might be whisked away to film.
"The kids can be working well and then they have to go on set and the work is broken up and forgotten.
"But an hour of one-on-one learning is worth more than an hour in the classroom and we should be doing enough for most of them to keep up," he says.
Eoin Colfer thinks he might be the victim of an elaborate game dreamt up by his agent to keep him happy. He is visiting the set of Half Moon Investigations, the new Children's BBC drama based on his book of the same name, and admits it is "very weird" to see his characters alive.
"It gives you a very strange, surreal feeling to see something that popped into your head five years ago," he says. "I'm walking around the set as if I'm in a dream."
It is especially odd for Mr Colfer to meet Rory Elrick, who plays Fletcher Moon, given that Fletcher is essentially the young Eoin Colfer. Playing him, he jokes, is a "cross that no child should have to bear".
Rory and Seb Charles, who plays Red Sharkey, are "fantastically accurate", he says. "It is strange to make up characters and come and find someone else has made them better. I don't know if I'm delighted or insulted. I think I'll go for delighted."
This is the first time Mr Colfer, a former primary teacher, has seen one of his books in production. It is in safe hands, he feels.
"The best thing I can do is turn on the TV in January. You need to touch base every now and then, and see all this work happening, but it seems very hard work to me. I like to be in my shed with a cup of tea, writing."
When Half Moon Investigations is broadcast in the new year, some of the storylines will be familiar to Mr Colfer. but the bulk of them will be new. The mysteries in the novel only provided material for three episodes, estimates Josephine Ward, the executive producer, and there are 13.
Half Moon Investigations was a book born out of Mr Colfer's own childhood dreams of being a private detective. He went around hoping that crimes would pop up, but no mysteries presented themselves.
"Fletch Moon is a little guy like I was, but in the world of fiction he is actually able to go out and get himself a qualification," says Mr Colfer.
Fletcher studies for two years to gain the online qualification which allows him to practise as a private detective in the state of Washington. Fletcher, however, is based in Ireland and ends up working "a little bit out of his jurisdiction", says Mr Colfer. The TV drama is being shot even further out of his jurisdiction, in Scotland, and Rory is Scottish, but Mr Colfer is not concerned. "The book is set in an Irish town, but it's a story that could happen in any urban school."