fix compiler warnings and honor code standards