tried to remedy any issues with Labyrinth, but didn't re-implement structure matching because it seemed too complex to touch right now.