Fix some wx3.1 assertions and some C++ tidying.