* check for compiling with clang
* fixed a lot of warnings
* fixed a lot of warnings