Compilation warnings removed + a few fixes.