Merge  gpimblott changes into richards branch