Some constness improved
Removed all warnings
Now to compile with g++ is enought to issue: "CXX=1 make"