Code for reproducing experiments in http://arxiv.org/abs/1305.6165