Updates to Shaun's code