Change some BOOL variables to actual booleans. These are ones that can be set to them safely.

At least this gets rid of typedef'd unsigned ints in some places.