A Toolkit for Recursive Partytioning