Minor edits to simplify boolean expressions / variable declarations