Some minor changes to get g++ to complain less about comparisons