Add logic to avoid the walls.
Cleanup.