Fix compilation
Big review