Made it compile for now. I know this is SNAPSHOT code but it is easier to analyse if it compiles.