The new StatementBuilder class enables to get rid of the block parameter in WhereBuilder.
Extracted some complexities into methods.
Add a class to clarify code around filtering duration.
Fix merge conflict.