Fixed up Compiler flags and a few compiler warnings