Code for the Funtana project