fix compiler warnings
add more warnings
fix old style function definitions