a lot of compiler warning fixes