fixed most compilation errors and warnings