Yeah, it's a bit of a mess, but thanks for the compliment! I was planning on something very different and had to settle multiple times on something smaller until I got to that point, but then I already had wasted too much time to add random rooms and multiple levels. I might add them later on. I kinda want to see where this can go with a little more effort. Although it's hacked so crudely together, I might just rewrite everything...
Anyways: To corner the ghosts try catching them between the bookshelves. Block both exists and then navigate the characters so the ghost has just 2 spaces to go. Then it will vanish. I'll add a screenshot to make it easier to understand :)
Edit: Okay, right now it's much harder than I intended it to be, oldschool hard. I'll balance it a bit better, when I pick it up again.