get out gcc warnings
portability changes
fix signed/unsigned mismatch
fix some format string parameter mismatches
remove unused code
remove some non-Watom compilers compilation warnings