See branch `duesee/issues_50`. Keep as is for now as long as first experiment with leaf node validation isn't finished. Merge afterwards.