Added "dead cell wall" checking

TODO Implement flag passing
Added toroid argument

Hooked it into main aswell