fixed most of the compiler warnings