Fixed CPP warnings and Linux build