Clear code in determinisation function