Finished writing addBooleanExpr and commenting things. Nothing has been tested so it probably won't work and I will have to rewrite everything.