Made code from today look nicer.

Moved dead zone into function and added a bunch of comments.