Code for the simulplay project