renamed wherearg to condition and promoted it to top-level class. added some hel
per methods to build a condition. fix code style to match rest of project