Fix compilation issues, add option to disable WE integration