This code was primarily written by Marina Polubelova (INRIA) and Santiago Zanella-Beguelin (MSR).