Code cleaning.
fixing g++ warnings
fix conflits
fixed conflits