Stuck in the sewers

I'm stuck in the sewers. I've been wandering all over it and cant find how to get out. I've found several switches and turned them on, i've found 2 or 3 secret rooms, i've found the room you can see from the library with the chest in it, i've found the final eye, but still no way out. there are still 3 gates that are closed. one is after the final eye where you can see the library, one has a door behind it and the other is a double gate. If anyone knows what I should do I'd be so greatful!! thanks 
