More cleanup & some code simplification

The commits are pretty much self explanatory. I didn't touch your `if (foo == false)` conditions when they were false because I guessed you don't like `if (!foo)`, but I removed the ones with `if (foo == true)` because they don't make a lot of sense as `if (foo)` means the same thing.