Code to accompany first project - Discrete cellular models using dynamic reference states