MANTA-28 improve compiler warnings and optimizations