Fix compile issues, does not run all testing, needs dejan merge