Merging in last commits from @lloydwatkin