I think three (ha!) things would’ve made it a lot better:
1. The end: the boxes should’ve just mysteriously disappeared. Not only was the ending bad, it also took the focus off of the theme of the episode, about how our comfort zone is out of the Doctor’s comfort zone.
I imagine the end was a standard “let’s chase away the baddies” end to show how the Doctor’s behaviour changes once he’s in his familiar area, but it didn’t work out well and was sort of redundant.
So the boxes should’ve just vanished.
2. The title – the word play wasn’t received well enough and it comes out somewhat childish. All the while, an underlying theme wasn’t noticed enough by the viewers.
So they should’ve titled it “Mad Man Outside a Box”.
(That’s why they chose to use boxes! These boxes, like the Pandorica, mirror the TARDIS poetically and are a tool that shows us something personal about the Doctor. The TARDIS is home, the Pandorica is jail – you reside there but you can’t get out, the Shakri boxes signify being pushed from home out to the cold)
3. It could use more of a square theme, graphically. Like the mad circle theme in Asylum. That would make it better knit together artistically.
EDIT: I did enjoy the episode! This post just focuses specifically on things I would change. Check out the rest of the posts on Power of Three.